
<%
Dim no7
Dim no7_numRows

Set no7 = Server.CreateObject("ADODB.Recordset")
no7.ActiveConnection = MM_conn_STRING
no7.Source = "SELECT *  FROM News  ORDER BY Time DESC"
no7.CursorType = 1
no7.CursorLocation = 2
no7.LockType = 1
no7.Open()

no7_numRows = 0
%>
<%

n=no7.recordcount
no7.movefirst
if n<5 then
for i=1 to n
id=(no7.Fields.Item("NewsID").Value)
title=(no7.Fields.Item("Title").Value)
response.Write("<a href=NewsContent.asp?newsid="&id&">"&title&"</a>")
response.Write("<BR>")
no7.movenext
next
else
for i=1 to 5
id=(no7.Fields.Item("NewsID").Value)
title=(no7.Fields.Item("Title").Value)
response.Write("<a href=NewsContent.asp?newsid='"&id&"'>"&title&"</a>")
response.Write("<BR>")
no7.movenext
next
end if
%>

<%
no7.Close()
Set no7 = Nothing
%>
